﻿* Encoding: UTF-8.
/* Reconsidering Tolerance: Insights from Political Theory and Three Experiments  
/*Replication syntax for Studies 2 and 3.


variable labels
scenario2 'Study 2 Scenario'
scenario3 'Study 3 Scenario'
treated 'Treatment'
study_23 'Study'
Age 'Age'
Income 'Income'
Religiosity 'Religiosity'
Education 'Education'
polview 'Political Views'
party 'Political Party'.
Execute.

Value Labels
treated
0 'Nonconvert'
1 'Convert To'
2 'Convert Away'.
Execute.

/* compute tolerance index

if (shouldnotputup = 7) shouldnotputup_r = 1.
if (shouldnotputup = 6) shouldnotputup_r = 2.
if (shouldnotputup = 5) shouldnotputup_r = 3.
if (shouldnotputup = 4) shouldnotputup_r = 4.
if (shouldnotputup = 3) shouldnotputup_r = 5.
if (shouldnotputup = 2) shouldnotputup_r = 6.
if (shouldnotputup = 1) shouldnotputup_r = 7.

if (banfromstugov= 7) banfromstugov_r = 1.
if (banfromstugov= 6) banfromstugov_r = 2.
if (banfromstugov= 5) banfromstugov_r = 3.
if (banfromstugov= 4) banfromstugov_r = 4.
if (banfromstugov= 3) banfromstugov_r = 5.
if (banfromstugov= 2) banfromstugov_r = 6.
if (banfromstugov= 1) banfromstugov_r = 7.

if (newspapernotpublish = 7) newspapernotpublish_r = 1.
if (newspapernotpublish = 6) newspapernotpublish_r = 2.
if (newspapernotpublish = 5) newspapernotpublish_r = 3.
if (newspapernotpublish = 4) newspapernotpublish_r = 4.
if (newspapernotpublish = 3) newspapernotpublish_r = 5.
if (newspapernotpublish = 2) newspapernotpublish_r = 6.
if (newspapernotpublish = 1) newspapernotpublish_r = 7.

compute tolerance_index = mean(allowspeech, rightexpress, shouldnotputup_r, banfromstugov_r, newspapernotpublish_r).
compute tolerance_index_1 = tolerance_index/7.

compute avoid_1 = avoid/7.
compute forgive_1 =  forgive/7.
compute  befriends_1 = befriends/7. 
compute bepolite_1 = bepolite/7.
compute dobusiness_1=  dobusiness/7.
compute inprivate_1 =  inprivate/7. 
compute inpublic_1  =  inpublic/7. 
compute  understand_1=  understand/7. 
compute  speakTV_1 = speakTV/7. 
compute teach_1 = teach/7. 
compute  occupy_1 =  occupy/7. 

compute minimum_1 = mean(avoid_1).
compute moderate_1 = mean(bepolite_1,dobusiness_1,inprivate_1,forgive_1).
compute maximal_1 = mean(speaktv_1, teach_1, occupy_1, inpublic_1,befriends_1).
 
compute worried_1 = worried/11.
compute uncomfortable_1 = uncomfortable/11.


Variable labels
tolerance_index_1 'Tolerance Index'
worried_1 'Worried'
uncomfortable_1 'Uncomfortable'
minimum_1 'Minimal'
moderate_1 'Moderate'
maximal_1 'Maximal'.
Execute.

/* Study 2 Ideology

/* Extreme right wing

USE ALL.
COMPUTE filter_$=(study_23 = 2  and polview< 6 and scenario2 = 1).
VARIABLE LABELS filter_$ 'study_23 = 2  and polview < 6 and scenario2=1 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

/* Table 2  (Nonconvert vs Convert To)

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Appendix B 

ONEWAY Age Income Religiosity Education BY treated
  /STATISTICS DESCRIPTIVES
  /MISSING ANALYSIS.

CROSSTABS
  /TABLES=Gender Ethnicity Party BY treated
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.


/* extreme left wing

USE ALL.
COMPUTE filter_$=(study_23 = 2  and scenario2 = 2 and polview< 6).
VARIABLE LABELS filter_$ 'study_23 = 2  and scenario2 = 2 and q21_polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Appendix B 

ONEWAY Age Income Religiosity Education BY treated
  /STATISTICS DESCRIPTIVES
  /MISSING ANALYSIS.

CROSSTABS
  /TABLES=Gender Ethnicity Party BY treated
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.


/* Study 3 Religion

/* Fundamentalist Islam

USE ALL.
COMPUTE filter_$=(study_23 = 3  and scenario3 = 1 and polview < 6).
VARIABLE LABELS filter_$ 'study_23 = 3  and scenario3 = 1 and polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Appendix B 

ONEWAY Age Income Religiosity Education BY treated
  /STATISTICS DESCRIPTIVES
  /MISSING ANALYSIS.

CROSSTABS
  /TABLES=Gender Ethnicity Party BY treated
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.


/* Radical Atheism

USE ALL.
COMPUTE filter_$=(study_23 = 3 and scenario3 = 2 and polview < 6).
VARIABLE LABELS filter_$ 'study_23 = 3   and scenario3 = 2 and polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Appendix B 

ONEWAY Age Income Religiosity Education BY treated
  /STATISTICS DESCRIPTIVES
  /MISSING ANALYSIS.

CROSSTABS
  /TABLES=Gender Ethnicity Party BY treated
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.


/* Table 3 Pooled findings 

/* Ideology (Study 2)

USE ALL.
COMPUTE filter_$=(study_23 = 2  and scenario2 <3 and polview < 6).
VARIABLE LABELS filter_$ 'study_23 = 2 and scenario2 <3 and polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Religion (Study 3)

USE ALL.
COMPUTE filter_$=(study_23 = 3  and scenario3 <3 and polview < 6).
VARIABLE LABELS filter_$ 'study_23 = 3  and scenario3 <3 and polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1 minimum_1 moderate_1 maximal_1
  /CRITERIA=CI(.95).

/* Figure 4. Graph showing results for studies 2 and 3, including "convert away'

if (scenario2 = 1) Study23_scenario = 1.
if (scenario2 = 2) Study23_scenario = 2.
if (scenario3 = 1) Study23_scenario = 3.
if (scenario3 = 2) Study23_scenario = 4.

Value labels
Study23_scenario
1 'Extreme Right Wing'
2 'Exreme Left Wing'
3 'Fundamentalist Islam'
4 'Radical Atheism'.
Execute.

variable labels
Study23_scenario 'Scenario'.
Execute.

USE ALL.
COMPUTE filter_$=(study_23 >1 and polview < 6).
VARIABLE LABELS filter_$ 'study_23 >1   and polview < 6 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

* Chart Builder.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=Study23_scenario MEANCI(tolerance_index_1,
    95)[name="MEAN_tolerance_index_1" LOW="MEAN_tolerance_index_1_LOW"
    HIGH="MEAN_tolerance_index_1_HIGH"] treated MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: Study23_scenario=col(source(s), name("Study23_scenario"), unit.category())
  DATA: MEAN_tolerance_index_1=col(source(s), name("MEAN_tolerance_index_1"))
  DATA: treated=col(source(s), name("treated"), unit.category())
  DATA: LOW=col(source(s), name("MEAN_tolerance_index_1_LOW"))
  DATA: HIGH=col(source(s), name("MEAN_tolerance_index_1_HIGH"))
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(3), label("Scenario"))
  GUIDE: axis(dim(2), label("Mean Tolerance Index"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label(""))
  GUIDE: text.footnote(label("Error Bars: 95% CI"))
  SCALE: cat(dim(3), include("1.00", "2.00", "3.00", "4.00"))
  SCALE: linear(dim(2), min(0), max(1))
  SCALE: cat(aesthetic(aesthetic.color.interior), include("0", "1", "2"))
  SCALE: cat(dim(1), include("0", "1", "2"))
  ELEMENT: interval(position(treated*MEAN_tolerance_index_1*Study23_scenario),
    color.interior(treated), shape.interior(shape.square))
  ELEMENT: interval(position(region.spread.range(treated*(LOW+HIGH)*Study23_scenario)),
    shape.interior(shape.ibeam))
END GPL.
